import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;

/**
 * @program: Learning
 * @description: 测试map
 * @Company: 汇华(北京)信息咨询服务有限公司
 * @author: peter.wei
 * @create: 2020-08-18 10:46
 **/
public class TestMap {
    public static void main(String[] args) {
        Map<String, String> linkMap = new LinkedHashMap<>();
        for (int i = 0; i < 10; i++) {
            linkMap.put("字段"+i, "数据"+i);
        }
        for (Map.Entry<String, String> entry : linkMap.entrySet()){
            System.out.println("key: " + entry.getKey() + ", value: " + entry.getValue());
        }


        Map<String, String> map = new HashMap<>();
        for (int i = 0; i < 10; i++) {
            map.put("字段"+i, "数据"+i);
        }
        for (Map.Entry<String, String> entry : map.entrySet()){
            System.out.println("key: " + entry.getKey() + ", value: " + entry.getValue());
        }
    }
}